package cn.gotom.pinggu.dao.jpa;

import java.util.List;

import cn.gotom.core.dao.jpa.GenericDaoJpa;
import cn.gotom.core.service.Parameter;
import cn.gotom.pinggu.dao.TrccDao;
import cn.gotom.pinggu.pojos.Trcc;

public class TrccDaoJpa extends GenericDaoJpa<Trcc, String> implements TrccDao
{

	public TrccDaoJpa()
	{
		super(Trcc.class);
	}

	@Override
	public List<Trcc> find(String nsrdm, int nd, int yf)
	{
		Parameter<String> pnsrdm = new Parameter<String>("nsrdm", nsrdm);
		Parameter<Integer> pnd = new Parameter<Integer>("nd", nd);
		if (yf > 0)
		{
			Parameter<Integer> pyf = new Parameter<Integer>("yf", yf);
			return find(pnsrdm, pnd, pyf);
		}
		else
		{
			return find(pnsrdm, pnd);
		}
	}

}
